The present invention relates to displaying graphics information in electronic data processing, and more particularly concerns apparatus and methods for efficiently displaying styled vectors or lines.
"Styling" a vector refers to displaying the vector not as a single continuous segment, but as a series or pattern of multiple shorter segments separated by blanked or interrupted portions. The common dotted line is an example of a styled vector, as is a center line having alternating long and short segments. In computer graphics, such vectors are useful not only to represent different types of data, but also to fill closed areas--such as polygons and circular sectors--with line patterns and to achieve additional colors by alternating very small segments of two basic colors. Other applications, such as the creation of bars, pie charts, woven patterns, and specialized cursors, are also possible.
Many conventional graphics units use bit-mapped displays, in which a buffer memory (or even the display itself) holds a two-dimensional matrix of addressable locations representing points or pixels, each location having either a single bit for a monochrome display or multiple bits to specify a number of possible colors. The placement of a vector to be drawn on the display may be specified by the horizontal and vertical locations X1 and Y1 of its beginning point, and by the horizontal and vertical locations X2 and Y2 of its end point. The problem of determining which intermediate pixels fall on this vector can be solved by a widely-used technique called Bresenham's algorithm, defined in J. E. Bresenham, "Algorithm for Computer Control of a Digital Plotter", IBM Systems Journal, Vol. 4, No. 1 (1965), pages 25-30. The algorithm is also described in J. D. Foley and A. Van Dam, Fundamentals of Interactive Computer Graphics (Addison-Wesley, 1982), pages 433-436. Although this algorithm is normally executed in software on a general-purpose data processor, it can be performed in hardware when required for higher speed.
In applications such as bit-map presentation graphics, the use of vector styling requires a great deal of time and/or facilities, even if either or both is done in hardware. Using software-generated styled vectors to fill polygon areas is impractical.